* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a237e 50%, #000051 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 50px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(100, 149, 237, 0.4);
    }
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    gap: 40px;
    justify-content: center;
    align-items: start;
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 280px;
    height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.character-card:hover::before {
    transform: translateX(100%);
}

.character-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border-color: rgba(100, 149, 237, 0.5);
}

.character-card img {
    width: 240px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    filter: brightness(0.9);
    align-self: center;
}

.character-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(100, 149, 237, 0.3);
}

.character-card h3 {
    font-size: 1.5em;
    margin-bottom: 8px;
    color: #ffffff;
}

.character-card p {
    font-size: 1.1em;
    color: #b3b3b3;
    margin-bottom: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    transition: color 0.3s ease;
}

.close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    gap: 30px;
    padding: 30px;
    align-items: flex-start;
}

.modal-body img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
}

.modal-info {
    flex: 1;
}

.modal-info h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #ffffff;
}

.modal-info h3 {
    font-size: 1.5em;
    color: #b3b3b3;
    margin-bottom: 20px;
}

.modal-info p {
    font-size: 1.2em;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: justify;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .characters-grid {
        grid-template-columns: 280px;
        gap: 30px;
    }
    
    .character-card {
        width: 280px;
        height: 400px;
    }
    
    .character-card img {
        width: 240px;
        height: 320px;
    }
    
    .modal-body {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-body img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .character-card {
        width: 260px;
        height: 380px;
    }
    
    .character-card img {
        width: 220px;
        height: 300px;
    }
}